Current Location: Home> Function Categories> expm1

expm1

Returns exp(number) - 1, and can calculate the exact result even when the value of number is close to zero.
Name:expm1
Category:math
Programming Language:php
One-line Description:Returns the value of -1 to the power of E.

Definition and usage

expm1() function returns exp(x) - 1, and can calculate the exact result even when the value of number is close to zero.

Example

In this example, we will apply the expm1() function to different numbers:

 <?php
echo ( expm1 ( 1 ) ) ;
echo ( expm1 ( - 1 ) ) ;
echo ( expm1 ( 5 ) ) ;
echo ( expm1 ( 10 ) )
?>

Try it yourself

grammar

 expm1 ( x )
parameter describe
x Required. A number.

illustrate

expm1() returns 'exp(x) - 1', and the accurate result can be calculated even when the value of x is close to zero. But when two values ​​approach equal, 'exp (x) - 1' becomes inaccurate.

Similar Functions
  • Sow the random number generator seeds srand

    srand

    Sowtherandomnumberge
  • Perform floating point division under IEEE 754 semantics fdiv

    fdiv

    Performfloatingpoint
  • Inverse hyperbolic sine asinh

    asinh

    Inversehyperbolicsin
  • Generate a random integer rand

    rand

    Generatearandominteg
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
  • Determine whether it is a finite value is_finite

    is_finite

    Determinewhetheritis
  • Antihyperbolic cosine acosh

    acosh

    Antihyperboliccosine
  • Determine whether it is a legal value is_nan

    is_nan

    Determinewhetheritis
Popular Articles